home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / amiga utilities / communication / internet / amitcp3.0b / src.lha / src / amitcp / sys / uio.h < prev   
Encoding:
C/C++ Source or Header  |  1996-09-08  |  3.3 KB  |  108 lines

  1. /*
  2.  * $Id: uio.h,v 3.1 1994/01/24 16:09:00 too Exp $
  3.  *
  4.  * Copyright (c) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  5.  *                    Helsinki University of Technology, Finland.
  6.  *                    All rights reserved.
  7.  *
  8.  * HISTORY
  9.  * $Log: uio.h,v $
  10.  * Revision 3.1  1994/01/24  16:09:00  too
  11.  * Moved definition of `struct iovec' to netinclude:sys/socket.h
  12.  *
  13.  * Revision 1.5  1993/06/04  11:16:15  jraja
  14.  * Fixes for first public release.
  15.  *
  16.  * Revision 1.4  1993/05/17  01:02:04  ppessi
  17.  * Changed RCS version
  18.  *
  19.  * Revision 1.3  1993/03/03  18:27:10  jraja
  20.  * Cleanup2.
  21.  *
  22.  * Revision 1.2  93/03/03  15:23:05  15:23:05  jraja (Jarno Tapio Rajahalme)
  23.  * Cleanup.
  24.  * 
  25.  * Revision 1.1  93/02/23  11:34:25  11:34:25  too (Tomi Ollila)
  26.  * Initial revision
  27.  */
  28.  
  29. /*
  30.  * Copyright (c) 1982, 1986 The Regents of the University of California.
  31.  * All rights reserved.
  32.  *
  33.  * Redistribution and use in source and binary forms, with or without
  34.  * modification, are permitted provided that the following conditions
  35.  * are met:
  36.  * 1. Redistributions of source code must retain the above copyright
  37.  *    notice, this list of conditions and the following disclaimer.
  38.  * 2. Redistributions in binary form must reproduce the above copyright
  39.  *    notice, this list of conditions and the following disclaimer in the
  40.  *    documentation and/or other materials provided with the distribution.
  41.  * 3. All advertising materials mentioning features or use of this software
  42.  *    must display the following acknowledgement:
  43.  *    This product includes software developed by the University of
  44.  *    California, Berkeley and its contributors.
  45.  * 4. Neither the name of the University nor the names of its contributors
  46.  *    may be used to endorse or promote products derived from this software
  47.  *    without specific prior written permission.
  48.  *
  49.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  50.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  51.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  52.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  53.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  54.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  55.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  56.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  57.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  58.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  59.  * SUCH DAMAGE.
  60.  *
  61.  *    @(#)uio.h    7.8 (Berkeley) 4/15/91
  62.  */
  63.  
  64. #ifndef SYS_UIO_H
  65. #define    SYS_UIO_H
  66.  
  67. #ifndef AMITCP
  68. enum    uio_rw { UIO_READ, UIO_WRITE };
  69.  
  70. /*
  71.  * Segment flag values.
  72.  */
  73. enum    uio_seg {
  74.     UIO_USERSPACE,        /* from user data space */
  75.     UIO_SYSSPACE,        /* from system space */
  76.     UIO_USERISPACE        /* from user I space */
  77. };
  78. #endif /* !AMITCP */
  79.  
  80. struct iovec;
  81. struct uio {
  82. #ifndef AMITCP
  83.     struct    iovec *uio_iov;
  84.     int    uio_iovcnt;
  85.     off_t    uio_offset;
  86.     int    uio_resid;
  87.     enum    uio_seg uio_segflg;
  88.     enum    uio_rw uio_rw;
  89.     struct    proc *uio_procp;
  90. #else
  91.     struct    iovec *uio_iov;
  92.     int    uio_iovcnt;
  93.     int    uio_resid;
  94.     struct    SocketBase *uio_procp;
  95. #endif    
  96. };
  97.  
  98.  /*
  99.   * Limits
  100.   */
  101. #define UIO_MAXIOV    1024        /* max 1K of iov's */
  102. #define UIO_SMALLIOV    8        /* 8 on stack, else malloc */
  103.  
  104. #endif /* !SYS_UIO_H */
  105.  
  106.  
  107.  
  108.